Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

make run complains about missing conf #1

Closed
mkmik opened this issue Jun 5, 2012 · 3 comments
Closed

make run complains about missing conf #1

mkmik opened this issue Jun 5, 2012 · 3 comments

Comments

@mkmik
Copy link
Contributor

mkmik commented Jun 5, 2012

Hi, sorry I don't have much time to contribute, I just tried to run it and it doesn't work. I didn't see any documentation in your README referring to where to put the required configuration or in general how to startup the development environment.

sudo ./swaddle local.env ./env/bin/aspen \
        --www_root=www/ \
        --project_root=.. \
        --show_tracebacks=yes \
        --changes_reload=yes \
        --network_address=:80
[SWADDLE] local.env is not a file; environment unchanged.
pid-23591 thread-47493497806592 (MainThread) Reading configuration from defaults, environment, and command line.
pid-23591 thread-47493497806592 (MainThread)   changes_reload         False                          default                 
pid-23591 thread-47493497806592 (MainThread)   changes_reload         True                           command line option --changes_reload=yes
pid-23591 thread-47493497806592 (MainThread)   charset_dynamic        UTF-8                          default                 
pid-23591 thread-47493497806592 (MainThread)   charset_static         None                           default                 
pid-23591 thread-47493497806592 (MainThread)   configuration_scripts  []                             default                 
pid-23591 thread-47493497806592 (MainThread)   indices                [u'index.html', u'index.json', u'index'] default                 
pid-23591 thread-47493497806592 (MainThread)   list_directories       False                          default                 
pid-23591 thread-47493497806592 (MainThread)   logging_threshold      0                              default                 
pid-23591 thread-47493497806592 (MainThread)   media_type_default     text/plain                     default                 
pid-23591 thread-47493497806592 (MainThread)   media_type_json        application/json               default                 
pid-23591 thread-47493497806592 (MainThread)   network_address        ((u'0.0.0.0', 8080), 2)        default                 
pid-23591 thread-47493497806592 (MainThread)   network_address        ((u'0.0.0.0', 80), 2)          command line option --network_address=:80
pid-23591 thread-47493497806592 (MainThread)   network_engine         cherrypy                       default                 
pid-23591 thread-47493497806592 (MainThread)   project_root           None                           default                 
pid-23591 thread-47493497806592 (MainThread)   project_root           ..                             command line option --project_root=..
pid-23591 thread-47493497806592 (MainThread)   renderer_default       tornado                        default                 
pid-23591 thread-47493497806592 (MainThread)   show_tracebacks        False                          default                 
pid-23591 thread-47493497806592 (MainThread)   show_tracebacks        True                           command line option --show_tracebacks=yes
pid-23591 thread-47493497806592 (MainThread)   www_root               None                           default                 
pid-23591 thread-47493497806592 (MainThread)   www_root               www/                           command line option --www_root=www/
pid-23591 thread-47493497806592 (MainThread) project_root is relative: '..'.
pid-23591 thread-47493497806592 (MainThread) project_root set to /home/marko/Projects/www.gittip.com.
pid-23591 thread-47493497806592 (MainThread) Renderers (*ed are unavailable, CAPS is default):
pid-23591 thread-47493497806592 (MainThread)   TORNADO   
pid-23591 thread-47493497806592 (MainThread)  *pystache  ImportError: No module named pystache
pid-23591 thread-47493497806592 (MainThread)  *jinja2    ImportError: No module named jinja2
pid-23591 thread-47493497806592 (MainThread) Oh no! Aspen crashed!
pid-23591 thread-47493497806592 (MainThread) Traceback (most recent call last):
pid-23591 thread-47493497806592 (MainThread)   File "/home/marko/Projects/www.gittip.com/env/local/lib/python2.7/site-packages/aspen/server.py", line 122, in main
pid-23591 thread-47493497806592 (MainThread)     _main(argv)
pid-23591 thread-47493497806592 (MainThread)   File "/home/marko/Projects/www.gittip.com/env/local/lib/python2.7/site-packages/aspen/server.py", line 48, in _main
pid-23591 thread-47493497806592 (MainThread)     website = Website(argv)
pid-23591 thread-47493497806592 (MainThread)   File "/home/marko/Projects/www.gittip.com/env/local/lib/python2.7/site-packages/aspen/website.py", line 25, in __init__
pid-23591 thread-47493497806592 (MainThread)     self.configure(argv)
pid-23591 thread-47493497806592 (MainThread)   File "/home/marko/Projects/www.gittip.com/env/local/lib/python2.7/site-packages/aspen/configuration/__init__.py", line 347, in configure
pid-23591 thread-47493497806592 (MainThread)     execfile(filepath, {'website': self})
pid-23591 thread-47493497806592 (MainThread)   File "/home/marko/Projects/www.gittip.com/configure-aspen.py", line 8, in <module>
pid-23591 thread-47493497806592 (MainThread)     gittip.wireup.canonical()
pid-23591 thread-47493497806592 (MainThread)   File "/home/marko/Projects/www.gittip.com/gittip/wireup.py", line 13, in canonical
pid-23591 thread-47493497806592 (MainThread)     gittip.canonical_scheme = os.environ['CANONICAL_SCHEME']
pid-23591 thread-47493497806592 (MainThread)   File "/home/marko/Projects/www.gittip.com/env/lib/python2.7/UserDict.py", line 23, in __getitem__
pid-23591 thread-47493497806592 (MainThread)     raise KeyError(key)
pid-23591 thread-47493497806592 (MainThread) KeyError: 'CANONICAL_SCHEME'
@chadwhitacre
Copy link
Contributor

Thanks for diving in! :D

Short story is a local.env file in the distribution root with the following keys:

'''
CANONICAL_HOST=
CANONICAL_SCHEME=http
DATABASE_URL=postgres://user:pass@localhost/dbname
GAUGES=false
SAMURAI_MERCHANT_KEY=
SAMURAI_MERCHANT_PASSWORD=
SAMURAI_PROCESSOR_TOKEN=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_CALLBACK=http://vcap.me/github/associate
DYLD_LIBRARY_PATH=/Library/PostgreSQL/9.1/lib
'''

The GAUGES key is cruft and can go away (using Google Analytics).

The SAMURAI_* keys are problematic. I need to think about how to handle that safely. Same with GITHUB_*

The DYLD_LIBRARY_PATH thing is to get psycopg2 working on Mac OS with EnterpriseDB's Postgres 9.1 installer.

@chadwhitacre
Copy link
Contributor

Copied these notes to the README in ee215ae.

@chadwhitacre
Copy link
Contributor

I've confirmed that the site can run without SAMURAI_. More build instructions in 70113d5. Re-open if needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants